<script setup>
import {getBanner} from '@/api/Home/home'
import {ref,onMounted} from 'vue'
const bannerList = ref([])
const getBannerList = async ()=>{
    const res = await getBanner({distributionSite:'2'})
    bannerList.value = res.data.result
}
onMounted(()=>{
     getBannerList()
})
</script>

<template>
    <div class="banner container">
        <el-carousel :interval="5000" height="500px" >
            <el-carousel-item v-for="item in bannerList" :key="item.id">
                <img :src="item.imgUrl" alt="">
            </el-carousel-item>
        </el-carousel>
    </div>
</template>

<style scoped lang="scss">
.banner{
    width: 1240px;
    height: 500px;
    img{
        width: 100%;
        height: 500px;
    }
}

</style>